package com.lywz.biz.common.entity.scenic;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

import com.lywz.core.entity.AbstractEntity;

/**
 * 景区首页、分类首页上的实体类
 * 
 * @author Huadi Luojun
 * @date 2010-5-4
 */
@Entity
@Table(name = "t_scenichome")
@NamedQueries( {
        @NamedQuery(name = "scenic.HomepageList", query = "from ScenicHomepage where showLocation = 1 order by category, showOrder"),
        @NamedQuery(name = "scenic.CategoryList", query = "from ScenicHomepage where category = :category and showLocation = 2 order by showOrder") })
public class ScenicHomepage extends AbstractEntity {

    private static final long serialVersionUID = 7895446719318330962L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    private String name;

    private String imageUrl;

    private Integer scenicId;

    private Integer category;

    private Integer showLocation;

    private Integer showOrder;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public Integer getScenicId() {
        return scenicId;
    }

    public void setScenicId(Integer scenicId) {
        this.scenicId = scenicId;
    }

    public Integer getCategory() {
        return category;
    }

    public void setCategory(Integer category) {
        this.category = category;
    }

    public Integer getShowLocation() {
        return showLocation;
    }

    public void setShowLocation(Integer showLocation) {
        this.showLocation = showLocation;
    }

    public Integer getShowOrder() {
        return showOrder;
    }

    public void setShowOrder(Integer showOrder) {
        this.showOrder = showOrder;
    }

    /** NULL Constructor */
    public ScenicHomepage() {
    }

    /** Full Constructor */
    public ScenicHomepage(Integer id, String name, String imageUrl, Integer scenicId,
            Integer category, Integer showLocation, Integer showOrder) {
        super();
        this.id = id;
        this.name = name;
        this.imageUrl = imageUrl;
        this.scenicId = scenicId;
        this.category = category;
        this.showLocation = showLocation;
        this.showOrder = showOrder;
    }

}
